package com.ruoyi.contract.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 发票管理对象 invoice_main
 * 
 * @author ruoyi
 * @date 2021-04-25
 */
public class InvoiceMain extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private String gid;

    /** 发票编号 */
    @Excel(name = "发票编号")
    private String code;

    /** 客户名称 */
    @Excel(name = "客户名称")
    private String customer;

    /** 合同ID */
    @Excel(name = "合同ID")
    private String contractId;

    /** 发票状态 */
    @Excel(name = "发票状态")
    private Integer state;

    /** 收款状态 */
    @Excel(name = "收款状态")
    private Integer collectionState;

    /** 已收款金额 */
    @Excel(name = "已收款金额")
    private BigDecimal receivedAmount;

    /** 税率 */
    @Excel(name = "税率")
    private BigDecimal taxRate;

    /** 税额 */
    @Excel(name = "税额")
    private BigDecimal taxAmount;

    /** 发票金额 */
    @Excel(name = "发票金额")
    private BigDecimal invoiceAmount;

    /** 开票日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开票日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date invoiceDate;

    /** 开票人 */
    @Excel(name = "开票人")
    private String invoiceUser;

    public void setGid(String gid) 
    {
        this.gid = gid;
    }

    public String getGid() 
    {
        return gid;
    }
    public void setCode(String code) 
    {
        this.code = code;
    }

    public String getCode() 
    {
        return code;
    }
    public void setCustomer(String customer) 
    {
        this.customer = customer;
    }

    public String getCustomer() 
    {
        return customer;
    }
    public void setContractId(String contractId) 
    {
        this.contractId = contractId;
    }

    public String getContractId() 
    {
        return contractId;
    }
    public void setState(Integer state) 
    {
        this.state = state;
    }

    public Integer getState() 
    {
        return state;
    }
    public void setTaxRate(BigDecimal taxRate) 
    {
        this.taxRate = taxRate;
    }

    public Integer getCollectionState() {
        return collectionState;
    }
    public void setCollectionState(Integer collectionState) {
        this.collectionState = collectionState;
    }

    public BigDecimal getReceivedAmount() {
        return receivedAmount;
    }
    public void setReceivedAmount(BigDecimal receivedAmount) {
        this.receivedAmount = receivedAmount;
    }

    public BigDecimal getTaxRate()
    {
        return taxRate;
    }
    public void setTaxAmount(BigDecimal taxAmount) 
    {
        this.taxAmount = taxAmount;
    }

    public BigDecimal getTaxAmount() 
    {
        return taxAmount;
    }
    public void setInvoiceAmount(BigDecimal invoiceAmount) 
    {
        this.invoiceAmount = invoiceAmount;
    }

    public BigDecimal getInvoiceAmount() 
    {
        return invoiceAmount;
    }

    public Date getInvoiceDate() {
        return invoiceDate;
    }

    public void setInvoiceDate(Date invoiceDate) {
        this.invoiceDate = invoiceDate;
    }

    public String getInvoiceUser() {
        return invoiceUser;
    }

    public void setInvoiceUser(String invoiceUser) {
        this.invoiceUser = invoiceUser;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("gid", getGid())
            .append("code", getCode())
            .append("customer", getCustomer())
            .append("contractId", getContractId())
            .append("state", getState())
            .append("collectionState", getCollectionState())
            .append("receivedAmount", getReceivedAmount())
            .append("taxRate", getTaxRate())
            .append("taxAmount", getTaxAmount())
            .append("invoiceAmount", getInvoiceAmount())
            .append("invoiceDate", getInvoiceDate())
            .append("invoiceUser", getInvoiceUser())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
